1. Field of the Invention
Embodiments of the present invention generally relate to memory allocation for multithreaded processing and, more specifically, to dynamically allocating per-thread memory from a memory pool.
2. Description of the Related Art
Conventional multithreaded processing systems use off-chip memory to store data for each thread being processed. An amount of memory needed to store the greatest amount of data needed for a thread is needed for each of the threads that may be processed in parallel by the multithreaded processing system. Therefore, the total amount of memory needed to process the threads may be larger than is practical to dedicate to the thread processing. Increasing the off-chip memory to accommodate the memory needed for all of the threads may increase the cost of producing the processing system. In order to reduce the cost, in some conventional systems the amount of memory allocated to the threads is limited and the number of the threads that can be processed in parallel is limited by disabling some of the thread processors. In those systems, the processing performance of the multithreaded processing units may be reduced since fewer threads are processed in parallel.
Accordingly, there is a desire to allow as many threads as possible to execute in parallel even when an amount of memory equal to the greatest amount of memory needed by any of the threads is not allocated for each thread.